package function.lly;

import java.util.function.Function;

/**
 * Created by lxue on 16/5/10.
 */
public interface Promise<T> {
    <R> Promise<R> then(Function<T, R> fulfilled, Function<Exception, R> rejected);
    <R> Promise<R> onFulfilled(Function<T, R> fulfilled);
    <R> Promise<R> onRejected(Function<Exception, R> rejected);
}
